package com.car.car.utils;

import com.car.car.VO.ResultVO;
import com.car.car.domian.Result;


public class ResultUtil {

    public static ResultVO success(Object object){
        ResultVO result = new ResultVO();
        result.setCode(0);
        result.setMessage("成功");
        result.setData(object);
        return result;
    }

    public static ResultVO success(){
        return success(null);
    }

    public static ResultVO error(Integer code, String message){
        ResultVO result = new ResultVO();
        result.setCode(code);
        result.setMessage(message);
        return result;
    }
}
